package com.eden.manage.mapper;

import com.eden.manage.dto.agent.AgentDto;
import com.eden.manage.model.EdenPlatAgentInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.eden.manage.req.query.AgentQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 98050
* @description 针对表【eden_plat_agent(平台代理商信息表)】的数据库操作Mapper
* @createDate 2023-11-11 10:53:52
* @Entity com.eden.manage.model.EdenPlatAgentInfo
*/
public interface EdenPlatAgentInfoMapper extends BaseMapper<EdenPlatAgentInfo> {


    List<AgentDto> selectPageList(@Param("query") AgentQuery query);

    int countByPage(@Param("query") AgentQuery query);

    AgentDto selectById(@Param("id") Long id);

    int updateAgent(AgentDto agentDto);

    int openAgent(@Param("id") Long id);
    int frozenAgent(@Param("id") Long id);
    int freeAgent(@Param("id") Long id);


    List<EdenPlatAgentInfo> selectListFirstLevel(@Param("platId") Long platId);
    List<EdenPlatAgentInfo> selectListByNextLevel(@Param("platId") Long platId,@Param("agentId") Long agentId);

    List<EdenPlatAgentInfo> selectListByIds(@Param("ids") List<Long> ids);

}




